using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class FT_PKT_LookupMap : EntityTypeConfiguration<FT_PKT_Lookup>
    {
        public FT_PKT_LookupMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.ID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.Name)
                .HasMaxLength(100);

            this.Property(t => t.Code)
                .HasMaxLength(20);

            this.Property(t => t.RecordType)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("FT_PKT_Lookup");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Name).HasColumnName("Name");
            this.Property(t => t.Code).HasColumnName("Code");
            this.Property(t => t.RecordType).HasColumnName("RecordType");
            this.Property(t => t.SPID).HasColumnName("SPID");
        }
    }
}
